Ext.onReady(function() {
	
    Ext.define('ILibraryApp.form.overrides.Panel', {
        override:'Ext.form.Panel',
        defaults:{
            labelAlign:'right'
        }
    });
    
    Ext.define('ILibraryApp.combobox.overrides.ComboBox', {
        override: 'Ext.form.field.ComboBox',
        editable: false,
        emptyText: '请选择'
    });
    
    Ext.define('ILibraryApp.data.overrides.Store', {
        override: 'Ext.data.Store',
        constructor: function() {
            var cfg = cfg||{};
            this.pageSize = constants.PAGING_EACH_CNT;
            this.callParent(arguments);
        }
    });
    
    Ext.define('ILibraryApp.data.overrides.Store', {
        override: 'Ext.data.Store',
        autoSync:true
    });
    
    Ext.define("ILibraryApp.grid.overrides.Panel", {
        override: "Ext.grid.Panel",
        initComponent: function (cfg) {
            var me = this;
            Ext.apply(me, {
                selModel: Ext.create('Ext.selection.CheckboxModel'),
                enableColumnHide: false
            });
            me.callParent(cfg);
        }
    });
    
    Ext.define('ILibraryApp.grid.overrides.View', {
        override: 'Ext.grid.View',
        initComponent: function (cfg) {
            var me = this;
            Ext.apply(me, {
                enableTextSelection: true
            });
            me.callParent(cfg);
        }
    });
    
    Ext.define('ILibraryApp.grid.column.overrides.Column', {
        override: 'Ext.grid.column.Column',
        constructor:function(){
            var cfg = cfg||{};
            if(this.xtype === 'gridcolumn' && !this.renderer){
                this.renderer = function(value, metaData, record, rowIndex, colIndex, store, view) {
                    if(value == null) {
                        return '--';
                    }else {
                        return value;
                    }
                }
            }
            this.callParent(arguments);
        }
    });
    
});